<!DOCTYPE html>
<#assign secSelect = JspTaglibs["http://www.casic304.cn/secSelect"] />
<#assign dicSelect = JspTaglibs["http://www.casic304.cn/dicSelect"]/>
<#assign fillDept=JspTaglibs["http://www.casic304.cn/fillDept"] />
<html>
<head>
    <meta charset="utf-8">
    <title>发动机试车基本信息</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
    <link rel="stylesheet" href="${ctx}/layui/css/layui.css" media="all"/>
    <link rel="stylesheet" href="${ctx}/qbdmsStatic/iconfont/iconfont.css"/>
    <link rel="stylesheet" href="${ctx}/qbdmsStatic/style/forms/currencyCss.css">
    <link rel="stylesheet" href="${ctx}/qbdmsStatic/style/qbdms.css">
    <script type="text/javascript">
        var __ctx = "${ctx}";
    </script>
    <style>
        .qbdms-TBinformation{margin-left: 0;font-size: 15px}
    </style>
</head>
<body class="listBody">

<div class="qbdms-bodyDiv" >
    <div class="qbdms-backDiv">
        <div class="layui-table-view-body" style="padding: 0 24px 24px;">
            <div class="qbdms-formTitle" style="border-bottom: 1px solid #E5F0FF">发动机试车信息 <i  class="qbdms-returnOn closeWindow">返回</i></div>
            <form class="layui-form treeFormPreview"  requrl="${ctx}/qbdms/wFadongji/get"  lay-filter="wFadongjiDataForm" style="bottom: 30px">

                <@fillDept.dept css="dragInfo temSpace" id="tbxx"/>

                <div class="layui-row">
                    <div class="" style="display: none;">
                        <label class="layui-form-label qbdms-label" title="主键">主键</label>
                        <div class="layui-input-block qbdms-input">
                            <input type="text" name="id"  placeholder="请输入" fieldname="id"
                                   autocomplete="off" class="layui-input" maxlength="50">
                        </div>
                    </div>

                    <div style="width: 65%">
                        <label class="layui-form-label qbdms-label" title="发动机名称">发动机名称<span style="color: red;">*</span></label>
                        <div class="layui-input-block qbdms-input">
                            <input type="text" name="fdjmc"  placeholder="请输入" lay-verify="required" lay-reqtext="发动机名称是必填项"
                                   autocomplete="off" class="layui-input" maxlength="50" fieldname="fdjmc">
                        </div>
                    </div>
                    <div style="width: 45%">
                        <label class="layui-form-label qbdms-label" title="密级">密级<span style="color: red;">*</span></label>
                        <div class="layui-input-block qbdms-input">
                            <@secSelect.sec_select required=true data_src=1 name="secret"/>
                        </div>
                    </div>
                    <div style="width: 65%">
                        <label class="layui-form-label qbdms-label" title="发动机代号">发动机代号<span style="color: red;">*</span></label>
                        <div class="layui-input-block qbdms-input">
                            <input type="text" name="fdjdh" placeholder="请输入"
                                   autocomplete="off" class="layui-input  textInput" lay-verify="required" lay-reqtext="发动机代号是必填项"
                                   maxlength="50" fieldname="fdjdh">
                        </div>
                    </div>

                    <div style="width: 65%">
                        <label class="layui-form-label qbdms-label" title="发动机批次">发动机批次<span style="color: red;">*</span></label>
                        <div class="layui-input-block qbdms-input">
                            <input type="text" name="fdjpc" placeholder="请输入"
                                   autocomplete="off" class="layui-input  textInput" lay-verify="required" lay-reqtext="发动机批次是必填项"
                                   maxlength="50" fieldname="fdjpc">
                        </div>
                    </div>

                    <div style="width: 65%">
                        <label class="layui-form-label qbdms-label" title="发动机编号">发动机编号<span style="color: red;">*</span></label>
                        <div class="layui-input-block qbdms-input">
                            <input type="text" name="fdjbh" placeholder="请输入"
                                   autocomplete="off" class="layui-input  textInput" lay-verify="required" lay-reqtext="发动机编号是必填项"
                                   maxlength="50" fieldname="fdjbh">
                        </div>
                    </div>

                    <div style="width: 45%">
                        <label class="layui-form-label qbdms-label" title="研制阶段">研制阶段<span style="color: red;">*</span></label>
                        <div class="layui-input-block qbdms-input">
                            <@dicSelect.dic name="yzjd" verify="required" reqtext="研制阶段是必填项" nodeKey="fdjsjyzjd" />
                        </div>
                    </div>

                    <div style="width: 65%">
                        <label class="layui-form-label qbdms-label" title="试车单位">试车单位<span style="color: red;">*</span></label>
                        <div class="layui-input-block qbdms-input">
                            <input type="text" name="sjsw" placeholder="请输入"
                                   autocomplete="off" class="layui-input  textInput" lay-verify="required" lay-reqtext="试车单位是必填项"
                                   maxlength="50" fieldname="sjsw">
                        </div>
                    </div>

                    <div style="width: 45%">
                        <label class="layui-form-label qbdms-label" title="试车日期">试车日期<span style="color: red;">*</span></label>
                        <div class="layui-input-block qbdms-input">
                            <input type="text" name="sjrq" readonly  placeholder="请输入" lay-reqtext="试车日期是必填项"
                                   autocomplete="off" class="layui-input dateTimeFiled textInput time-init" lay-verify="required"  maxlength="50" fieldname="sjrq">
                        </div>
                    </div>
                    <div style="width: 45%">
                        <label class="layui-form-label qbdms-label" title="试车结果">试车结果</label>
                        <div class="layui-input-block qbdms-input">
                            <@dicSelect.dic name="sjjg" nodeKey="fdjsjjg" />
                        </div>
                    </div>
                </div>

                <div class="layui-form-item" style="margin-top: 48px">
                    <p style="text-align: left;margin-left: 145px;">
                    <span id="hideAndShow" style="">
                        <a lay-submit lay-filter="wFadongji" class="layui-btn btn-n privateSubmit qbdms-oneBtn"
                           requrl="${ctx}/qbdms/wFadongji/save">提交</a>
                    </span>
                        <button type="reset" id="closeWindow" style="margin-left: 10px;"
                                class="layui-btn layui-btn-sm btn-save closeWindow qbdms-oneBtnLine">取消
                        </button>
                    </p>
                </div>
            </form>
        </div>
    </div>
</div>

<script src="${ctx}/qbdmsStatic/public/configFile.js"></script>
<script src="${ctx}/layui/layui.js"></script>
<script>
    layui.config({
        base: serverPath.qbdmsPath + staticPath.qbdmsPath //静态资源所在路径
    }).extend({
        index: 'lib/index' //主入口模块
    }).use(['index','common','laydate','jquery','publicMethods','propsHandle'], function () {
        var laydate = layui.laydate;
        var $ = layui.jquery;
        var common = layui.common;
        var publicMethods = layui.publicMethods;
        var propsHandle = layui.propsHandle;
        var defProps = {
                //viewMould: 'form/formDef/view/formDesign/moulds/', // 组件模块 存放文件 *****
                viewMould: 'moulds/', // 组件模块 存放文件 *****
                selectorBtn: '.selectorBtn'
            },
            temQuery = new propsHandle();  // 实例化模板功能部分
        temQuery.initTem({
            selectorBtn: defProps.selectorBtn,
            selectorTemPath: setter.views + defProps.viewMould
        });
        var dateTimeFiledLen = $(".dateTimeFiled");
        for(var i=0;i<dateTimeFiledLen.length;i++){
            laydate.render({
                elem: dateTimeFiledLen[i] //指定元素
                ,type: 'date'
                ,trigger: 'click'
            });
        }

        //关闭当前页面
        $(".closeWindow").click(function () {
            window.location.href ='${ctx}/qbdms/wFadongji/view/list';
        });



        var index = parent.layer.getFrameIndex(window.name);
        common.updateForm({
            name:'wFadongjiDataForm',
            idValue:"${id}",
            primary:"id",
            updateCallback:function (data) {
                if (common.filterRecord(data)) {
                    if($(".privateSubmit")){
                        $(".privateSubmit").attr("disabled",false).css("pointer-events","auto");
                    }
                    layer.alert(publicMethods.confirmStyle(data.msg),{title: false,skin: 'confirm-class'}, function (index) {
                        layer.close(index);
                        window.location.href = '${ctx}/qbdms/wFadongji/view/list';
                    });
                } else {
                    layer.alert(publicMethods.confirmStyle(data.msg),{title: false,skin: 'confirm-class'});
                }
                return false;
            }
            ,getCallback:function(data){
                $("#tbxx").html("<span class='qbdms-TBinformation'>填报信息:</span>" +
                    "<span class='qbdms-TBinformationText'>【"+data.data.filldept+"   | "+data.data.fillman+"  | "+data.data.filldate+"】</span>");

            }
        });
    });
</script>
</body>
</html>